package com.woniu.command.userCommand;

import com.woniu.command.Command;
import com.woniu.command.handler.UserCommandHandler;
import com.woniu.outlet.po.UserPo;
import com.woniu.utils.ApplicationContextHolder;

public class UpdateUserCommand implements Command<UserPo, Integer> {

    private UserCommandHandler handler;

    public UpdateUserCommand() {
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(UserCommandHandler.class);
    }

    @Override
    public Integer execute(UserPo userPo) {
        return this.handler.updateUser(userPo);
    }
}
